Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create odroid-xu3-fan-control.service #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

empierre
Copy link

systemv startup script to place into /etc/systemd/system

systemv startup script to place into /etc/systemd/system
ExecStart=/usr/home/odroid/odroid-xu3-fan-control/odroid-xu3-fan-control.sh
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
User=www-data
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any particular reason why www-data user, and not ... say odroid?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modevd to odroid, usually www-data is a login less user, so a bit safer.

@nthx
Copy link
Owner

nthx commented Nov 30, 2015

I would also love to see update in README, to reflect new/alternative instructions of the setup. I myself even don't know what to do with the service file. :->

I propose a change in README "Installation" section. You should add a subsection and adapt texts to say that there are 2 alternative ways of the setup.
Every install instruction (bash command) should be given for end user. Example commands to start/stop/restart services too.

Hope, I don't ask too much :-)

moved to odroid user, removed network target
@empierre
Copy link
Author

can do ;-)

[Service]
Type=simple
WorkingDirectory=/home/odroid/odroid-xu3-fan-control
ExecStart=/usr/home/odroid/odroid-xu3-fan-control/odroid-xu3-fan-control.sh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just tested this. But doesn't work. Is /usr/home/.. prefix an issue? Typo?

nthx@odroid:~$ sudo cp odroid-xu3-fan-control.service /etc/systemd/system

nthx@odroid:~$ ll /home/odroid/odroid-xu3-fan-control
total 16
-rw-rw-r-- 1 nthx nthx 1080 Nov 23 23:34 LICENSE
-rwxrwxr-x 1 nthx nthx 1963 Nov 23 23:34 odroid-fan-controller*
-rwxrwxr-x 1 nthx nthx 2591 Nov 23 23:34 odroid-xu3-fan-control.sh*
-rw-rw-r-- 1 nthx nthx 1431 Nov 23 23:38 README.md

nthx@odroid:~$ sudo service odroid-fan-controller start
Failed to start odroid-fan-controller.service: Unit odroid-fan-controller.service failed to load: No such file or   directory.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right

@nthx
Copy link
Owner

nthx commented Dec 11, 2015

Still same error: File was copied properly. All paths looks to match.

nthx@odroid:/etc/systemd/system$ sudo service odroid-fan-controller start
Failed to start odroid-fan-controller.service: Unit odroid-fan-controller.service failed to load: No such file or directory.

Can you please reabase too, so there is 1 commit in PR

@empierre
Copy link
Author

the message is on a missing path, have you done the "sudo cp odroid-xu3-fan-control.service /etc/systemd/system" before ?

@nthx
Copy link
Owner

nthx commented Dec 11, 2015

Of course I did

nthx@odroid:~$ ll /etc/systemd/system/odroid-xu3-fan-control.service 
-rw-r--r-- 1 root root 542 Dec 11 10:13 /etc/systemd/system/odroid-xu3-fan-control.service
nthx@odroid:~$ md5sum /etc/systemd/system/odroid-xu3-fan-control.service
682b9925922d87b4d1dea3519dee8556  /etc/systemd/system/odroid-xu3-fan-control.service

@empierre
Copy link
Author

what gives:
sudo systemctl enable odroid-xu3-fan-control

and:
sudo journalctl

(at the end)

@empierre
Copy link
Author

I've updated the readme for this was missing:
sudo systemctl enable /etc/systemd/system/odroid-xu3-fan-control.service
sudo systemctl start odroid-xu3-fan-control.service

sorry I had no time to test it yet

@nthx
Copy link
Owner

nthx commented Dec 11, 2015

nthx@odroid:~$ sudo systemctl enable odroid-xu3-fan-control
Created symlink from /etc/systemd/system/multi-user.target.wants/odroid-xu3-fan-control.service to /etc/systemd/system/odroid-xu3-fan-control.service.

"Nothing" in the log

nthx@odroid:~$ sudo service odroid-fan-controller start
Failed to start odroid-fan-controller.service: Unit odroid-fan-controller.service failed to load: No such file or directory.

nthx@odroid:~$ sudo systemctl start odroid-xu3-fan-control.service
nthx@odroid:~$ ps fxa|grep fan
 3647 pts/0    S+     0:00              \_ grep --color=auto fan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants